CC = g++
LIB = -L../lib 
INCLUDE = -I../base -I../include

CFLAG = -DLINUX -DLOG_LEVEL_LITE -DDEBUG -g -c
#CFLAG = -DLOG_LEVEL_HEAVY -c
#PROFILE = -pg
PROFILE = 
OPTIMIZE =
WARNNING = -w
LINKLIB = -lpthread
TARGET = ../lib/libboard.a
OBJECTS = AutoMakeRoom.o LobbyEnter_Default.o LobbyManager.o Room.o AllUser_RoomExit_Default.o RoomCreate_Default.o RoomEnter_Default.o RoomManager.o User.o UserManager.o RoomExit_Default.o LobbyService.o OperateProcess.o NotifyManager.o

${TARGET} : ${OBJECTS}
	ar r ${TARGET} AutoMakeRoom.o
	ar r ${TARGET} LobbyEnter_Default.o
	ar r ${TARGET} LobbyManager.o
	ar r ${TARGET} Room.o
	ar r ${TARGET} User.o
	ar r ${TARGET} RoomCreate_Default.o
	ar r ${TARGET} RoomEnter_Default.o
	ar r ${TARGET} RoomExit_Default.o
	ar r ${TARGET} AllUser_RoomExit_Default.o
	ar r ${TARGET} RoomManager.o
	ar r ${TARGET} UserManager.o
	ar r ${TARGET} LobbyService.o
	ar r ${TARGET} OperateProcess.o
	ar r ${TARGET} NotifyManager.o
	ar s ${TARGET}
	ar t ${TARGET}

AutoMakeRoom.o : AutoMakeRoom.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp

NotifyManager.o : NotifyManager.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp

User.o : User.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp

Room.o : Room.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp

LobbyEnter_Default.o : LobbyEnter_Default.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp

LobbyManager.o : LobbyManager.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp

RoomCreate_Default.o : RoomCreate_Default.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp

RoomEnter_Default.o : RoomEnter_Default.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp

RoomExit_Default.o : RoomExit_Default.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp

AllUser_RoomExit_Default.o : AllUser_RoomExit_Default.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp

RoomManager.o : RoomManager.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp

UserManager.o : UserManager.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp

LobbyService.o : LobbyService.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp
	
OperateProcess.o : OperateProcess.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp

clean :
	rm -rf *.o *.a

new:
	${MAKE} clean
	${MAKE}
